home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-03 | 1.5 KB | 51 lines | [TEXT/CWIE] |
- // =================================================================================
- //
- // CClockControl.h ©1996 Microsoft Corporation All rights reserved.
- //
- // =================================================================================
-
- #ifndef _H_CClockControl
- #define _H_CClockControl
- #pragma once
-
- #include "CBaseControl.h"
-
- class CClockControl : public CBaseControl
- {
-
- public:
- // *** CClockControl methods ***
- CClockControl(void);
- ~CClockControl(void);
-
- // *** IControl methods ***
- STDMETHOD (Draw) (THIS_ DrawContext* inContext);
- STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
- STDMETHOD(DoIdle)(THIS_ Uint32 IdleRefCon);
-
- protected:
- virtual Boolean8 StartIdling(void);
- virtual Boolean8 StopIdling(void);
-
- private:
- void DrawAllContexts();
-
- // *** private methods ***
- void DrawMe(Rect *BoundsRect, Int32 ContextIndex);
- void DrawHands(Rect *ClockRect, DateTimeRec *Time, RGBColor *Color, Boolean8 Erasing, Int16 Pressed);
- void FigureHandPoints(Int16 Angle, double LengthPercent, Int16 WidthPixels, Rect *ClockRect, Int16 *XArray, Int16 *YArray);
- Int16 Reflection(Int16 InboundLight, Int16 StartX, Int16 StartY, Int16 EndX, Int16 EndY);
- void HighlightHands(Int16 LightAngle, Int16 HandAngle, RGBColor *Color, Boolean Erasing, Int16 *XArray, Int16 *YArray);
-
- // *** private members ***
- DateTimeRec mTime;
- DateTimeRec mEraseTime;
- Int32 mHandsDirty;
- Int32 mFaceDirty;
- Boolean8 mIsPressed;
- Boolean8 mIsIdling;
-
- };
-
- #endif
-